<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">

<h:head>
</h:head>
<h:body>
	<h:form id="form">
	<p:growl showDetail="true"></p:growl>
		<p:panel header="Contatos">
			<h:panelGrid columns="2">
				<h:outputLabel value="Nome:" for="txtNome"></h:outputLabel>
				<p:inputText id="txtNome" value="#{usuarioBean.usuario.nome}" 
				requiredMessage="O nome é obrigatório" required="true" />

				<h:outputLabel value="Email:" for="txtEmail"></h:outputLabel>
				<p:inputText id="txtEmail" value="#{usuarioBean.usuario.email}"></p:inputText>
				
				<h:outputLabel value="Data:" for="txtData"></h:outputLabel>
				<p:calendar pattern="dd/MM/yyyy" locale="pt_BR" 
					value="#{usuarioBean.usuario.nascimento}" />

				<p:commandButton value="Inserir Contato" action="#{usuarioBean.salvar()}" />
			</h:panelGrid>
		</p:panel>
		
	</h:form>
</h:body>
</html>